import request from '@/utils/request'

// 查询测试需求单维护列表
export function listCalcdemand(query) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand/list',
    method: 'get',
    params: query
  })
}

// 查询测试需求单维护详细
export function getCalcdemand(fid) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand/' + fid,
    method: 'get'
  })
}

// 新增测试需求单维护
export function addCalcdemand(data) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand',
    method: 'post',
    data: data
  })
}

// 修改测试需求单维护
export function updateCalcdemand(data) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand',
    method: 'put',
    data: data
  })
}

// 删除测试需求单维护
export function delCalcdemand(fid) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand/' + fid,
    method: 'delete'
  })
}

// 下推至成本测算
export function pushCostCalc(data) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand/push',
    method: 'post',
    data: data
  })
}

export function checkBelow(data) {
    return request({
      url: '/bomcostestimation/basebill/calcdemand/checkBelow',
      method: 'post',
      data: data
    })
}
// 单据状态操作
export function optionStatus(id,status) {
  return request({
    url: '/bomcostestimation/basebill/calcdemand/optionstatus/' + id + "/" + status,
    method: 'get'
  })
}
